﻿using System;
using System.Windows.Input;

namespace Tools
{
    public class SearchCommand : ICommand
    {

        private Action _action;
        public SearchCommand(Action action)
        {
            this._action = action;
        }

        public bool CanExecute(object parameter)
        {
            return true;
        }

        public void Execute(object parameter)
        {
            this._action();
        }

        public event EventHandler CanExecuteChanged;
    }
}